package com.yunhai.model.entity.fms;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.yunhai.model.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

@ApiModel("配方步骤")
@Data
@Accessors(chain = true)
@TableName("fms_formula_step")
public class FmsFormulaStepEntity {

    @TableId( type = IdType.ASSIGN_ID)
    private Long id;

    //是否需要温度
    @ApiModelProperty( "是否需要温度" )
    private Integer temperatureRequired;

    //最高温度
    @ApiModelProperty( "最高温度" )
    private Double maxTemperature;

    //最低温度
    @ApiModelProperty( "最低温度" )
    private Double minTemperature;

    //序列
    @ApiModelProperty( "序列" )
    private Integer seq;

    //顺序
    @ApiModelProperty( "顺序" )
    private Integer sort;

    //物料id
    @ApiModelProperty( "物料id" )
    private Long materialId;

//    物料名称
    @ApiModelProperty( "物料名称" )
    private String materialName;

    //物料单位
    @ApiModelProperty( "物料单位" )
    private String materialUnit;

    //产品id
    @ApiModelProperty( "产品id" )
    private Long productId;

    //重量
    @ApiModelProperty( "重量" )
    private Integer value;

    //创建日期
    @JsonFormat( pattern = "YYYY-MM-dd HH:mm:ss")
    @TableField( value="create_time", fill=FieldFill.INSERT )
    private LocalDateTime createTime;

    //创建人
    @JsonIgnore
    @TableField( value="create_by", fill=FieldFill.INSERT )
    private String createBy;

    //更新时间
    @JsonFormat( pattern = "YYYY-MM-dd HH:mm:ss")
    @TableField( value="update_time", fill= FieldFill.INSERT_UPDATE )
    private LocalDateTime updateTime;

    //更新人
    @JsonIgnore
    @TableField( value="update_by", fill= FieldFill.INSERT_UPDATE )
    private String updateBy;

}
